package com.ipan.kits.reflect;

import org.apache.commons.beanutils.converters.AbstractConverter;

/**
 * 枚举类型转换器
 * 
 * @author iPan
 * @version 2014-5-3
 */
public class EnumConverter  extends AbstractConverter {

	@Override
	protected Object convertToType(Class type, Object value) throws Throwable {
		return Enum.valueOf(type, (String) value);
	}

	@Override
	protected Class getDefaultType() {
		return Enum.class;
	}

}
